<include file="Public/head" title="订单详情"/>
<include file="Public/back_head"/>
<div class="main">
    <a href="{:$order_info['status'] == '1'?U('User/address',array('type'=>'1')):'javascript:void(0)'}">
        <div class="addrecipient_url">
            <div class="top"><span>{$order_info.contact_user}</span><span>{$order_info.contact_phone}</span></div>
            <div class="bottom"><i class="iconfont icon-weizhi1"></i>{$order_info.contact_area}{$order_info.contact_address}<i class="iconfont icon-zuoyoujiantou2"></i></div>
            <img src="__PUBLIC__/home/image/border_01.png" alt="" class="border_01">
        </div>
    </a>
    <div class="select_shop_info clear">
        <img src="{$order_info.goods_pic}" alt="">
        <div class="select_shop_right">
            <div class="title">{$order_info.goods_name}</div>
            <div class="show">{:cut_str($order_info['goods_profile'],15)}</div>
            <div class="money clear"><i class="iconfont icon-jiage-copy"></i>{$order_info.goods_price} <span>X {$order_info.order_num}</span></div>
            <div class="type">颜色:  {$order_info.goods_spec}</div>
        </div>
    </div>
    <div class="vip_service">
        <div class="title3">订单编号：<em>{$order_info.order_sn}</em>
		<if condition="$order_info.status eq '1'"><span class="r_bz">待付款</span></div></if>
		<if condition="$order_info.status eq '2'"><span class="r_bz">待发货</span></div></if>
		<if condition="$order_info.status eq '3'"><span class="r_bz">待收货</span></div></if>
		<if condition="$order_info.status eq '4'"><span class="r_bz">已收货</span></div></if>
		<if condition="$order_info.status eq '5'"><span class="r_bz">申请退货中</span></div></if>
		<if condition="$order_info.status eq '6'"><span class="r_bz">已退货</span></div></if>
        <div class="show3">下单时间：<em>{$order_info.create_time}</em></div>
    </div>
	<if condition="$order_info.service eq '2'">
    <div class="vip_service">
        <div class="title3">已选服务 <span>VIP通道</span></div>
        <div class="show3">刻字内容：{$order_info.vip_note}</div>
    </div>
	</if>
	<if condition="$order_info.service eq '3'">
    <div class="vip_service">
        <div class="title3">已选服务 <span>按天付</span></div>
        <div class="show3">首付金额￥{$order_info['order_price']-$order_info['deposit']}，每天还款{$order_info.perinfo.per_cash}，共还{$order_info.perinfo.per_days}天</div>
        <div class="show2">押金￥{$order_info['deposit']}</div>
    </div>
	</if>
    <div class="Pay">
        <div class="pay_money">
            <span>订单金额</span>
            <span><i class="iconfont icon-jiage-copy"></i>{$order_info.order_price}</span>
        </div>
    </div>   
    <div class="empty"></div>
</div>
<div class="place_order clear">
<if condition="$order_info.status eq '1'">
    <a href="{:U('Order/sub_order')}?order_id={$order_info.id}" class="btn_pay">立即支付</a>
	<a href="javascript:void(0);" onclick="cancel_order('{$order_info.id}')" class="btn_false">取消订单</a>
<script>
function cancel_order(order_id){
	confirm_dialog('确定要取消该订单吗？',function(){
		$.post('{:U("cancel_order")}',{order_id:order_id},function(data){
			layer.msg(data.info);
			if(data.url != '') setTimeout('location.href="'+data.url+'"',1000);
		})
	});
}
</script>
</if>
<if condition="$order_info.status eq '2'">
    <if condition="$order_info.refund_status eq '1'">
		<a href="javascript:void(0)" onclick="reply_refundment('{$order_info.id}')" class="btn_pay">申请退款</a>
	<elseif condition="$order_info.refund_status eq '5'"/>
		<a href="javascript:void(0)" style="color:#fa4054;border:none;" class="btn_pay">退款申请中</a>
	<else/>
		<a href="javascript:void(0)" style="color:#fa4054;border:none;" class="btn_pay">已退款</a>
	</if>
<script>
function reply_refundment(order_id){
	confirm_dialog('亲，您的宝贝儿即将发货，<br/>是否继续退款',function(){
		$.post("{:U('reply_refundment')}",{order_id:order_id},function(data){
			layer.msg(data.info);
			if(data.url != '') setTimeout('location.href="'+data.url+'"',1000);
		});
	});
}
</script>
</if>
<if condition="$order_info.status eq '3'">
    <a href="javascript:void(0)" class="btn_pay">查看物流</a>
	<a href="javascript:void(0);" class="btn_false">确认收货</a>
</if>
<if condition="$order_info.status eq '4'">
    <a href="javascript:void(0)" class="btn_pay">申请退货</a>
</if>
</div>

<include file="Public/foot"/>